num = 10
# def fn():
#     global num
#     num = 100
# # fn()
# print(num)
# def fe(num):
#     num = 100
# (fe(num))
# f = open('./dictemo1.txt',mode= 'r', encoding='utf8')
# #TODO 2 操作文件
# # f.write ('今天天气真好.适合睡觉!\t')
# # f.write('今天不错')
# # f.close()
# o = open('./dictemo1.txt', mode='rb')
# content = o.read(6)
# print(content)
f = open('笔记/dictemo2.txt', mode='w', encoding='utf8')
print(f)
f = open('笔记/dictemo2.txt', 'r', encoding='utf8')
while True:
    lice1 = f.readline()
    if not lice1:
        break
        print(lice1)
f.close()
'''1.根据录入的1,2 判断用户为登录和注册
2.注册: 将用户录入的'''
code = input('输入功能[1注册|2登录]:')
if code == '1':
    #注册
   #接受用户输入
    username = input('username:')
    passwdrd = input('password:')
    f = open('dictemo2.txt, 'a', encoding='utf8')
